<p id="notice"><%= notice %></p>

<h1>Listing Microposts</h1>

<table>
  <thead>
    <tr>
      <th>Content</th>
      <th>User</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @microposts.each do |micropost| %>
      <tr>
        <td><%= micropost.content %></td>
        <td><%= micropost.user_id %></td>
        <td><%= link_to 'Show', micropost %></td>
        <td><%= link_to 'Edit', edit_micropost_path(micropost) %></td>
        <td><%= link_to 'Destroy', micropost, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Micropost', new_micropost_path %>
